﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Intrinsics.X86;
using NetTopologySuite.Index.HPRtree;
using Coldairarrow.Util;
using Castle.Core.Internal;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 产品表现
    /// </summary>
    /// 

    public class PrdPerformanceDTO
    {
        public string code { get; set; }
        public string msg { get; set; }
        public bool success { get; set; }
        public string traceId { get; set; }
        public PrdPerformance_List data { get; set; }

    }

    public class PrdPerformance_List
    {
        /// <summary>
        /// 总数
        /// </summary>
        public int total { get; set; }

        /// <summary>
        /// 记录列表
        /// </summary>
        public List<PrdPerformance> list { get; set; }
    }

    public class PrdPerformance
    {
        public string ID { get; set; }
        public string RowId { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        public string date { get; set; }
        /// <summary>
        /// ACOS
        /// </summary>
        public string OL_ACOS { get; set; }
        /// <summary>
        /// 父asins信息
        /// </summary>
        public List<parent_asins> parent_asins { get; set; }

        /// <summary>
        /// 父asin
        /// </summary>
        public string parent_asin { get; set; }



        /// <summary>
        /// asin列表
        /// </summary>
        public List<asins> asins { get; set; }

        /// <summary>
        /// asin	
        /// </summary>
        public string asin { get; set; }



        /// <summary>
        /// 价格列表
        /// </summary>
        public List<price_list> price_list { get; set; }
        /// <summary>
        /// 国家	
        /// </summary>
        public string country { get; set; }
        /// <summary>
        /// 是否欧洲共享库存：0 否，1 是	
        /// </summary>
        private string is_eur_;
        public string is_eur
        {
            get { return is_eur_; }
            set
            {
                if (value == "0") is_eur_ = "否";
                else if (value == "1") is_eur_ = "是";
                else is_eur_ = value;
            }
        }
        /// <summary>
        /// sku	
        /// </summary>
        public string local_sku { get; set; }


        /// <summary>
        /// sku	
        /// </summary>
        public string OL_SKU_;
        public string OL_SKU
        {

            get { return OL_SKU_; }


            set
            {
                if (value.Contains("["))
                {
                    List<AssTable> table = value.ToObject<List<AssTable>>();
                    if (!table.IsNullOrEmpty() && table.Count > 0)
                    {
                        OL_SKU_ = table.First().sid;
                    }
                    else
                    {
                        OL_SKU_ = "";
                    }
                }
                else
                {
                    OL_SKU_ = value;
                }
            }

        }
        /// <summary>
        /// msku	
        /// </summary>
        public string OL_MSKU_;
        public string OL_MSKU
        {

            get { return OL_MSKU_; }


            set
            {
                if (value.Contains("["))
                {
                    List<AssTable> table = value.ToObject<List<AssTable>>();
                    if (!table.IsNullOrEmpty() && table.Count > 0)
                    {
                        OL_MSKU_ = table.First().sid;
                    }
                    else
                    {
                        OL_MSKU_ = "";
                    }
                }
                else
                {
                    OL_MSKU_ = value;
                }

            }

        }

        /// <summary>
        /// 站点ID	
        /// </summary>
        public string mid { get; set; }
        /// <summary>
        /// 品名【sku维度才有值】
        /// </summary>
        public string local_name_asin { get; set; }
        /// <summary>
        /// 店铺ID	
        /// </summary>
        public string sid { get; set; }
        /// <summary>
        /// 是否删除	
        /// </summary>
        public string is_delete_;
        public string is_delete
        {
            get { return is_delete_; }
            set
            {
                if (value == "0") is_delete_ = "否";
                else if (value == "1") is_delete_ = "是";
                else is_delete_ = value;
            }
        }
        /// <summary>
        /// 对应的销量	
        /// </summary>
        public string volume_asin { get; set; }
        /// <summary>
        /// 店铺名称	
        /// </summary>
        public string seller_name_asin { get; set; }
        /// <summary>
        /// 历史快照价格	
        /// </summary>
        public string price { get; set; }
        /// <summary>
        /// msku	
        /// </summary>
        public string seller_sku { get; set; }
        /// <summary>
        /// 商品原币种汇率	
        /// </summary>
        public string source_rate { get; set; }
        /// <summary>
        /// 状态	
        /// </summary>
        public string _status;
        public string status
        {
            get { return _status; }
            set
            {
                if (value == "0") _status = "未使用";
                else if (value == "1") _status = "已激活";
                else if (value == "2") _status = "未完成";
                else _status = value;
            }
        }
        /// <summary>
        /// 分类ID	
        /// </summary>
        public string cid { get; set; }



        /// <summary>
        /// 小类排名	
        /// </summary>
        public List<small_cate_rank> small_cate_rank { get; set; }
        /// <summary>
        /// 类别	
        /// </summary>
        public string category { get; set; }
        /// <summary>
        /// 上一次小类排名	
        /// </summary>
        public string prev_rank { get; set; }
        /// <summary>
        /// 排名	
        /// </summary>
        public string rank { get; set; }

        /// <summary>
        /// 标题	
        /// </summary>
        public string item_name { get; set; }
        /// <summary>
        /// sku	
        /// </summary>
        public string sku { get; set; }
        /// <summary>
        /// 品名	
        /// </summary>
        public string local_name { get; set; }
        /// <summary>
        /// 大类排名	
        /// </summary>
        public string cate_rank { get; set; }
        /// <summary>
        /// 大类排名分类	
        /// </summary>
        public string rank_category { get; set; }
        /// <summary>
        /// 上一次大类排名	
        /// </summary>
        public string prev_cate_rank { get; set; }
        /// <summary>
        /// 币种符号	
        /// </summary>
        public string currency_icon { get; set; }
        /// <summary>
        /// 采购成本	
        /// </summary>
        public string cg_price_currency_icon { get; set; }



        /// <summary>
        /// 店铺/国家	
        /// </summary>
        public List<seller_store_countries> seller_store_countries { get; set; }
        /// <summary>
        /// 店铺名	
        /// </summary>
        public string seller_name { get; set; }



        /// <summary>
        /// 分类	
        /// </summary>
        public List<string> categories { get; set; }

        /// <summary>
        /// 分类	
        /// </summary>
        public string categorie { get; set; }

        /// <summary>
        /// 品牌	
        /// </summary>
        public List<string> brands { get; set; }

        /// <summary>
        /// 品牌	
        /// </summary>
        public string brand { get; set; }

        /// <summary>
        /// 负责人	
        /// </summary>
        public List<string> principal_names { get; set; }

        /// <summary>
        /// 负责人	
        /// </summary>
        public string principal_name { get; set; }

        /// <summary>
        /// 开发人	
        /// </summary>
        public List<string> developer_names { get; set; }

        /// <summary>
        /// 开发人	
        /// </summary>
        public string developer_name { get; set; }
        /// <summary>
        /// 月库销比	
        /// </summary>
        public string month_stock_sales_ratio { get; set; }
        /// <summary>
        /// 销量	
        /// </summary>
        public string volume { get; set; }
        /// <summary>
        /// B2B销量	
        /// </summary>
        public string b2b_volume { get; set; }
        /// <summary>
        /// 订单量	
        /// </summary>
        public string order_items { get; set; }
        /// <summary>
        /// B2B订单量	
        /// </summary>
        public string b2b_order_items { get; set; }
        /// <summary>
        /// 销售额	
        /// </summary>
        public string amount { get; set; }

        /// <summary>
        /// 销售额$
        /// </summary>
        public string amount_dollar { get; set; }
        /// <summary>
        /// B2B销售额	
        /// </summary>
        public string b2b_amount { get; set; }
        /// <summary>
        /// 销量环比	
        /// </summary>
        public string volume_chain_ratio { get; set; }
        /// <summary>
        /// 销量额环比
        /// </summary>
        public string amount_chain_ratio { get; set; }
        /// <summary>
        /// 订单量环比
        /// </summary>
        public string order_chain_ratio { get; set; }
        /// <summary>
        /// 结算毛利润
        /// </summary>
        public string gross_profit { get; set; }
        /// <summary>
        /// 订单毛利润
        /// </summary>
        public string predict_gross_profit { get; set; }
        /// <summary>
        /// 结算毛利率
        /// </summary>
        public string gross_margin { get; set; }
        /// <summary>
        /// 订单毛利率
        /// </summary>
        public string predict_gross_margin { get; set; }
        /// <summary>
        /// ROI
        /// </summary>
        public string roi { get; set; }
        /// <summary>
        /// 促销销量
        /// </summary>
        public string promotion_volume { get; set; }
        /// <summary>
        /// 促销销售额
        /// </summary>
        public string promotion_amount { get; set; }
        /// <summary>
        /// 促销订单量
        /// </summary>
        public string promotion_order_items { get; set; }
        /// <summary>
        /// 促销折扣	
        /// </summary>
        public string promotion_discount { get; set; }
        /// <summary>
        /// 促销折扣$
        /// </summary>
        public string promotion_discount_dollar { get; set; }
        /// <summary>
        /// 评论数
        /// </summary>
        public string reviews_count { get; set; }
        /// <summary>
        /// 退款量
        /// </summary>
        public string return_count { get; set; }
        /// <summary>
        /// 退款率
        /// </summary>
        public string return_rate { get; set; }
        /// <summary>
        /// FBA可售
        /// </summary>
        public string afn_fulfillable_quantity { get; set; }
        /// <summary>
        /// FBA入库中
        /// </summary>
        public string afn_inbound_receiving_quantity { get; set; }
        /// <summary>
        /// FBA在途
        /// </summary>
        public string afn_inbound_shipped_quantity { get; set; }
        /// <summary>
        /// FBA计划入库
        /// </summary>
        public string afn_inbound_working_quantity { get; set; }
        /// <summary>
        /// FBA不可售
        /// </summary>
        public string afn_unsellable_quantity { get; set; }
        /// <summary>
        /// 调仓中
        /// </summary>
        public string reserved_fc_processing { get; set; }
        /// <summary>
        /// 待调仓
        /// </summary>
        public string reserved_fc_transfers { get; set; }
        /// <summary>
        /// 待发货
        /// </summary>
        public string reserved_customerorders { get; set; }
        /// <summary>
        /// fbm库存
        /// </summary>
        public string fbm_quantity { get; set; }
        /// <summary>
        /// 实际在途
        /// </summary>
        public string stock_up_num { get; set; }
        /// <summary>
        /// 点击量
        /// </summary>
        public string clicks { get; set; }
        /// <summary>
        /// 可售预估天数
        /// </summary>
        public string available_days { get; set; }
        /// <summary>
        /// fbm可售天数
        /// </summary>
        public string fbm_available_days { get; set; }
        /// <summary>
        /// 评分
        /// </summary>
        public string avg_star { get; set; }
        /// <summary>
        /// 前一个评分
        /// </summary>
        public string prev_star { get; set; }
        /// <summary>
        /// 留评率
        /// </summary>
        public string comment_rate { get; set; }
        /// <summary>
        /// Sessions-Browser	
        /// </summary>
        public string sessions { get; set; }
        /// <summary>
        /// Sessions-Mobile
        /// </summary>
        public string sessions_mobile { get; set; }
        /// <summary>
        /// Sessions-Total
        /// </summary>
        public string sessions_total { get; set; }
        /// <summary>
        /// Buybox	
        /// </summary>
        public string buy_box_percentage { get; set; }
        /// <summary>
        /// PV-Browser	
        /// </summary>
        public string page_views { get; set; }
        /// <summary>
        /// PV-Mobile	
        /// </summary>
        public string page_views_mobile { get; set; }
        /// <summary>
        /// PV-Total	
        /// </summary>
        public string page_views_total { get; set; }
        /// <summary>
        /// 直接成交订单量	
        /// </summary>
        public string ad_direct_order_quantity { get; set; }
        /// <summary>
        /// 直接成交销售额	
        /// </summary>
        public string ad_direct_sales_amount { get; set; }
        /// <summary>
        /// 广告订单量占比	
        /// </summary>
        public string adv_rate { get; set; }
        /// <summary>
        /// 销量 CVR	
        /// </summary>
        public string volume_cvr { get; set; }
        /// <summary>
        /// CVR	
        /// </summary>
        public string cvr { get; set; }
        /// <summary>
        /// CTR,点击量/展示量	
        /// </summary>
        public string ctr { get; set; }
        /// <summary>
        /// 广告花费/总销售额	
        /// </summary>
        public string acoas { get; set; }
        /// <summary>
        /// 广告花费/广告销售额	
        /// </summary>
        public string acos { get; set; }
        /// <summary>
        /// 是否有操作日志	
        /// </summary>
        public string has_oprator_log { get; set; }
        /// <summary>
        /// 退货量	
        /// </summary>
        public string return_goods_count { get; set; }
        /// <summary>
        /// 退货率	
        /// </summary>
        public string return_goods_rate { get; set; }
        /// <summary>
        /// cpc,花费/点击量	
        /// </summary>
        public string cpc { get; set; }
        /// <summary>
        /// 广告花费	
        /// </summary>
        public string spend { get; set; }
        /// <summary>
        /// 广告花费	
        /// </summary>
        public string spend_dollar { get; set; }
        /// <summary>
        /// ROAS,广告销售额/广告花费	
        /// </summary>
        public string roas { get; set; }
        /// <summary>
        /// ASoAS,广告销售额/总销售额	
        /// </summary>
        public string asoas { get; set; }
        /// <summary>
        /// CPO,广告花费/广告订单量	
        /// </summary>
        public string cpo { get; set; }
        /// <summary>
        /// CPM,广告花费/(1000*展示量)	
        /// </summary>
        public string cpm { get; set; }
        /// <summary>
        /// 广告销售额	
        /// </summary>
        public string ad_sales_amount { get; set; }
        /// <summary>
        /// 广告销售额$
        /// </summary>
        public string ad_sales_amount_dollar { get; set; }
        /// <summary>
        /// 广告 CVR	
        /// </summary>
        public string ad_cvr { get; set; }
        /// <summary>
        /// 广告订单量	
        /// </summary>
        public string ad_order_quantity { get; set; }
        /// <summary>
        /// 差异分摊	
        /// </summary>
        public string shared_cost_of_advertising { get; set; }
        /// <summary>
        /// SB广告费	
        /// </summary>
        public string shared_ads_sb_cost { get; set; }
        /// <summary>
        /// SBV广告费	
        /// </summary>
        public string shared_ads_sbv_cost { get; set; }
        /// <summary>
        /// SD广告费	
        /// </summary>
        public string ads_sd_cost { get; set; }
        /// <summary>
        /// SP广告费	
        /// </summary>
        public string ads_sp_cost { get; set; }
        /// <summary>
        /// 展示	
        /// </summary>
        public string impressions { get; set; }
        /// <summary>
        /// 净销售额	
        /// </summary>
        public string net_amount { get; set; }

        /// <summary>
        /// 销售均价	
        /// </summary>
        public string avg_custom_price { get; set; }
        /// <summary>
        /// 平均销量	
        /// </summary>
        public string avg_volume { get; set; }
        /// <summary>
        /// 创建时间,sku维度特有	
        /// </summary>
        public string product_create_time { get; set; }
        /// <summary>
        /// 采购成本,sku维度特有	
        /// </summary>
        public string cg_price { get; set; }
        /// <summary>
        /// 可用货值,sku维度特有	
        /// </summary>
        public string whs_value { get; set; }
        /// <summary>
        /// 本地可用,sku维度特有	
        /// </summary>
        public string local_quantity { get; set; }
        /// <summary>
        /// 海外仓可用,sku维度特有
        /// </summary>
        public string oversea_quantity { get; set; }
        /// <summary>
        /// 存销比，sku维度特有
        /// </summary>
        public string inventory_sales_ratio { get; set; }
        /// <summary>
        /// 平均售价，sku维度特有
        /// </summary>
        public string avg_landed_price { get; set; }
        /// <summary>
        /// 供应商，sku维度特有	
        /// </summary>
        public List<string> suppliers { get; set; }
        /// <summary>
        /// 供应商，sku维度特有	
        /// </summary>
        public string supplier { get; set; }
        /// <summary>
        /// 型号，sku维度特有	
        /// </summary>
        public List<string> model { get; set; }
        /// <summary>
        /// 型号，sku维度特有	
        /// </summary>
        public string model_ { get; set; }
        /// <summary>
        /// 退款金额	
        /// </summary>
        public string return_amount { get; set; }
        /// <summary>
        /// 货币类型	
        /// </summary>
        public string currency_code { get; set; }
        /// <summary>
        /// 环比销量	
        /// </summary>
        public string volume_chain { get; set; }
        /// <summary>
        /// 环比销量额	
        /// </summary>
        public string amount_chain { get; set; }
        /// <summary>
        /// 环比订单量	
        /// </summary>
        public string order_items_chain { get; set; }

    }


    public class parent_asins
    {
        public string parent_asin { get; set; }
    }
    public class asins
    {
        public string asin { get; set; }
    }
    public class price_list
    {
        public string country { get; set; }
        public string is_eur { get; set; }
        public string local_sku { get; set; }
        public string mid { get; set; }
        public string local_name { get; set; }
        public string sid { get; set; }
        public string is_delete { get; set; }
        public string volume { get; set; }
        public string product_pic_url { get; set; }
        public string small_image_url { get; set; }
        public string seller_name { get; set; }
        public string price { get; set; }
        public string seller_sku { get; set; }
        public string source_rate { get; set; }
        public string status { get; set; }
        public string cid { get; set; }

    }

    public class small_cate_rank
    {
        /// <summary>
        /// asin	
        /// </summary>
        public string category { get; set; }
        /// <summary>
        /// asin	
        /// </summary>
        public string prev_rank { get; set; }
        /// <summary>
        /// asin	
        /// </summary>
        public string rank { get; set; }

    }

    public class seller_store_countries
    {
        public string seller_name { get; set; }

    }
}

